#include "Types.h"
#include "Generator.h"
#include <iostream>

using namespace std;

//arguments: MODE 0=GENERATE|1=IMPORT, LENGTH|INPUT_FILE, OLIGO_BASE_TEMPERATURE, OLIGO_TEMP_OFFSET, OUTPUT_FILE
int main(int argc, char** argv)
{
	if(argc < 6)
	{
		std::cout << "Not enough arguments.\nShutting down...\n";
		std::cout << "arguments: MODE 0=GENERATE|1=IMPORT, LENGTH|INPUT_FILE, OLIGO_BASE_TEMPERATURE, OLIGO_TEMP_OFFSET, OUTPUT_FILE\n";
	}
	else
	{
		Generator* generator;
		int mode = atoi(argv[1]);
		if(mode == GENERATE)
		{
			generator = new Generator(atoi(argv[2]), atoi(argv[3]), atoi(argv[4]));
		}
		else if(mode == IMPORT)
		{
			generator = new Generator(argv[2], atoi(argv[3]), atoi(argv[4]));
		}
		else
		{
			std::cout << "Invalid argument.\nShutting down...\n";
			return -1;
		}
		generator->CreateInstance(std::string(argv[5]));
	}
	system("pause");
	return 0;
}